#!/bin/bash
##  2022-09-04
## cd /Users/wuchunlong/local/github/kjyw/shell

## df -lh  查看当前机器挂载的各个磁盘的空间大小
## df -h   显示已经挂载的分区列表

disk_info=`df -lh / `
echo $disk_info
echo '----------------------------'

disk_info=`df -h / | grep  /`
echo $disk_info  #/dev/disk1s5s1 466Gi 21Gi 61Gi 26% 553788 4882923132 0% /
echo '----------------------------'

disk_size=`df -lh /| grep /| awk '{print $2, $5}'`
echo $disk_size #466Gi 26%
     
